package com.zy.test.controller;

import com.zy.test.DTO.Person;
import com.zy.test.annotation.NotNull;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author MissZhou
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

    @GetMapping("/interceptor")
    public String demoAction() {
        System.out.println("controller执行了.....");
        return "success";
    }

    @GetMapping("/demo")
    public String demoAction(Person person, @NotNull String param) {
        System.out.println("person--->" + person);
        return "success";
    }

}
